using System;
using System.Collections.Generic;
using System.Text;


namespace CommLayer
{
    public delegate void DelegateStringComNotifyConnect(DateTime arrivalTime, string str);
    public delegate void DelegateStringComNotifyData(DateTime arrivalTime, string str);
    public delegate void DelegateStringComNotifyException(DateTime arrivalTime, string str);

    public abstract class StringComInt
    {
        
        protected /*static*/ DelegateStringComNotifyData m_notificationDelegate;
        protected /*static*/ DelegateStringComNotifyConnect m_notificationDelegateConnect;
        protected /*static*/ DelegateStringComNotifyException m_notificationDelegateException;

        public abstract string IPAddress 
        {
            get;
            set;
        }

        public abstract int Port
        {
            get;
            set;
        }

        public abstract bool IsClient
        {
            get;
        }

        public abstract bool IsConnected
        {
            get;

        }

        public abstract void InitializeServer(DelegateStringComNotifyConnect connectCallbackFunc, 
                                                DelegateStringComNotifyData dataCallbackFunc, 
                                                DelegateStringComNotifyException exceptionCallbackFunc);

        public abstract void InitializeClient(DelegateStringComNotifyConnect connectCallbackFunc,
                                                DelegateStringComNotifyData dataCallbackFunc,
                                                DelegateStringComNotifyException exceptionCallbackFunc);

        public abstract void SendString(string XMLString);
        public abstract void SendStringAsync(string xmlString);
        public abstract void QueueSendString(string xmlString);
        public abstract int GetQueueSize();
        public abstract void Close();

     }
}
